﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Imports Utilerias
Public Class CatServidoresFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As CatServidoresBE
        Dim tmpCatServidores As CatServidoresBE = New CatServidoresBE()
        Try
            With tmpCatServidores
                .CantidadBD = convertDTFromDb.convertInt32(dr.Item("CantidadBD"))
                .Host = convertDTFromDb.ConvertString(dr.Item("Host"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .NombreBd = convertDTFromDb.ConvertString(dr.Item("NombreBd"))
                .Pass = RijndaelSimple.desencriptaDefault(dr.Item("Pass"))
                .Puerto = convertDTFromDb.ConvertString(dr.Item("Puerto"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .Usuario = convertDTFromDb.ConvertString(dr.Item("Usuario"))
            End With
            Return tmpCatServidores
        Catch ex As Exception
            Throw
        Finally
            tmpCatServidores = Nothing
        End Try
    End Function
End Class
